package com.huluobo.a2201mvvm_imdemo.chat;

import androidx.lifecycle.MutableLiveData;

import com.huluobo.a2201mvvm_imdemo.mvvm.BaseViewModel;
import com.hyphenate.chat.EMMessage;

/**
 * Created by LC on 2024/4/9.
 */
public class ChatViewModel extends BaseViewModel<ChatRepo> {
    MutableLiveData<EMMessage> sendSuccess = new MutableLiveData<>();

    MutableLiveData<String> sendFailed = new MutableLiveData<>();


    public void sendMessage(String content, String username, int chatType) {
        repo.sendMessage(content, username, chatType, sendSuccess, sendFailed);
    }

    @Override
    protected ChatRepo createRepo() {
        return new ChatRepo();
    }
}
